'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.post('/api/login', controller.user.login);//登录
  router.get('/api/sendCode',controller.user.getCode);//验证码
  router.post('/api/registry',controller.user.registry);//注册

  router.resources('user','/api/v1/users',controller.userList);
};
